package com.zzyl.controller;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.dto.AlertDataPageQueryDto;
import com.zzyl.service.AlertDataService;
import com.zzyl.vo.AlertDataVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/alert-data")
@Api(tags = "报警数据管理")
public class AlertDataController extends BaseController {
    @Autowired
    AlertDataService alertDataService;


@ApiOperation(value = "分页查询设备信息", notes = "根据页码、" +
        "每页数量、设备名称，产品key，设备类型分页查询设备信息")
@GetMapping("/pageQuery")
public ResponseResult<PageResponse<AlertDataVo>> page(AlertDataPageQueryDto alertDataPageQueryDto) {
    PageResponse<AlertDataVo> pageResponse =  
                       alertDataService.page(alertDataPageQueryDto);
    return ResponseResult.success(pageResponse);
}}